package com.blueocean_health.care.management.domain.checkWorkVo;

import com.blueocean_health.care.management.common.excel.ExcelResources;

import java.util.Date;

/**
 * @Author ChenPeng cp
 * @Date 2018/4/27 17:46
 */


public class CheckWorkListVo implements Comparable<CheckWorkListVo>{

    private String workerId;
    private String workStatus;
    private String workStatusName;
    private Integer groupId;
    private Date workTime;
    private String deflag;
    private String workName;
    private String workPyname;
    private String title;

    private String titleKey;
    private String workTimeStr;
    private String groupName;


    @ExcelResources(title = "考勤日期", order = 4)
    public String getWorkTimeStr() {
        return workTimeStr;
    }

    public void setWorkTimeStr(String workTimeStr) {
        this.workTimeStr = workTimeStr;
    }
    @ExcelResources(title = "所在小组", order = 5)
    public String getGroupName() {
        return groupName;
    }

    public void setGroupName(String groupName) {
        this.groupName = groupName;
    }

    public String getTitleKey() {
        return titleKey;
    }

    public void setTitleKey(String titleKey) {
        this.titleKey = titleKey;
    }

    public Integer getGroupId() {
        return groupId;
    }

    public void setGroupId(Integer groupId) {
        this.groupId = groupId;
    }

    public Date getWorkTime() {
        return workTime;
    }

    public void setWorkTime(Date workTime) {
        this.workTime = workTime;
    }

    public String getDeflag() {
        return deflag;
    }

    public void setDeflag(String deflag) {
        this.deflag = deflag;
    }

    public String getWorkPyname() {
        return workPyname;
    }

    public void setWorkPyname(String workPyname) {
        this.workPyname = workPyname;
    }

    public String getWorkerId() {
        return workerId;
    }

    public void setWorkerId(String workerId) {
        this.workerId = workerId;
    }
    @ExcelResources(title = "姓名", order = 1)
    public String getWorkName() {
        return workName;
    }

    public void setWorkName(String workName) {
        this.workName = workName;
    }
    @ExcelResources(title = "职务", order = 2)
    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getWorkStatus() {
        return workStatus;
    }

    public void setWorkStatus(String workStatus) {
        this.workStatus = workStatus;
    }
    @ExcelResources(title = "考勤状态", order = 3)
    public String getWorkStatusName() {
        return workStatusName;
    }

    public void setWorkStatusName(String workStatusName) {
        this.workStatusName = workStatusName;
    }


    @Override
    public int compareTo(CheckWorkListVo o) {
       /* int i = this.getGroupId() - o.getGroupId();//先按照小组排序
        if(i == 0){
            if (this.workerId.equals(o.workerId)){
                return 0;
            }else {
                return -1;
            }
        }
        return i;*/

        if(o.getGroupId().equals(this.getGroupId())){
            return this.getWorkerId() == null ? 1 : this.workerId.compareTo(o.getWorkerId());
        }
        return this.getGroupId() - o.getGroupId();
    }


}
